- WriterT <W, M, A> (Func<W, K<M, (A Value, W Output)>> runWriter)
- Pure (A value)
- Write ((A Value, W Output) result)
- Write (A value, W output)
- Listen ()
- Listens <B> (Func<W, B> f)
- Censor (Func<W, W> f)
- Lift (Pure<A> monad)
- Lift (K<M, A> monad)
- Lift (Func<A> f)
- LiftIO (IO<A> ma)
- MapT <M1, B> (Func<K<M, (A Value, W Output)>, K<M1, (B Value, W Output)>> f)
- MapM <B> (Func<K<M, A>, K<M, B>> f)
- Map <B> (Func<A, B> f)
- Select <B> (Func<A, B> f)
- Bind <B> (Func<A, K<WriterT<W, M>, B>> f)
- Bind <B> (Func<A, WriterT<W, M, B>> f)
- Bind <B> (Func<A, Tell<W>> f)
- Bind <B> (Func<A, IO<B>> f)
- SelectMany <B, C> (Func<A, K<WriterT<W, M>, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, WriterT<W, M, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, K<M, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, Pure<B>> bind, Func<A, B, C> project)
- SelectMany <C> (Func<A, Tell<W>> bind, Func<A, Unit, C> project)
- SelectMany <B, C> (Func<A, IO<B>> bind, Func<A, B, C> project)
- | (WriterT<W, M, A> ma, WriterT<W, M, A> mb)
- | (WriterT<W, M, A> ma, Pure<A> mb)
- | (Pure<A> ma, WriterT<W, M, A>mb)
- | (IO<A> ma, WriterT<W, M, A> mb)
- Run ()
- WriterTExtensions
- As <W, M, A> (this K<WriterT<W, M>, A> ma)
- Flatten <W, M, A> (this WriterT<W, M, WriterT<W, M, A>> mma)
- SelectMany <W, M, A, B, C> ( this K<M, A> ma, Func<A, K<WriterT<W, M>, B>> bind, Func<A, B, C> project)
- SelectMany <W, M, A, B, C> ( this K<M, A> ma, Func<A, WriterT<W, M, B>> bind, Func<A, B, C> project)
- WriterT <W>
- WriterT <W, M>
- WriterT
- bind <W, M, A, B> (WriterT<W, M, A> ma, Func<A, WriterT<W, M, B>> f)
- map <W, M, A, B> (Func<A, B> f, WriterT<W, M, A> ma)
- Pure <W, M, A> (A value)
- apply <W, M, A, B> (WriterT<W, M, Func<A, B>> mf, WriterT<W, M, A> ma)
- action <W, M, A, B> (WriterT<W, M, A> ma, WriterT<W, M, B> mb)
- lift <W, M, A> (K<M, A> ma)
- liftIO <W, M, A> (IO<A> effect)
- tell <M, W> (W item)
- write <M, W, A> ((A, W) item)
- write <M, W, A> (A value, W item)
- pass <M, W, A> (WriterT<W, M, (A Value, Func<W, W> Function)> action)
- listen <M, W, A> (WriterT<W, M, A> ma)
- listens <M, W, A, B> (Func<W, B> f, WriterT<W, M, A> ma)
- censor <M, W, A> (Func<W, W> f, WriterT<W, M, A> ma)
- WriterT <W, M>
record WriterT <W, M, A> (Func<W, K<M, (A Value, W Output)>> runWriter) Source #
WriterT
monad transformer, which adds a modifiable state to a given monad.
type | S | State type |
type | M | Given monad trait |
type | A | Bound value type |
param | runState | Transducer that represents the transformer operation |
method WriterT<W, M, A> Pure (A value) Source #
Lift a pure value into the monad-transformer
param | value | Value to lift |
returns |
|
method WriterT<W, M, A> Write ((A Value, W Output) result) Source #
Construct a writer computation from a (result, output) pair.
The inverse of Run()
param | result | Result / Output pair |
method WriterT<W, M, A> Write (A value, W output) Source #
Construct a writer computation from a (result, output) pair.
The inverse of Run()
param | result | Result / Output pair |
method WriterT<W, M, (A Value, W Output)> Listen () Source #
Writes an item and returns a value at the same time
method WriterT<W, M, (A Value, B Output)> Listens <B> (Func<W, B> f) Source #
Listens
executes the action and adds the result of applying f
to the
output to the value of the computation.
method WriterT<W, M, A> Censor (Func<W, W> f) Source #
Censor
executes the action and applies the function f
to its output,
leaving the return value unchanged.
method WriterT<W, M, A> Lift (Pure<A> monad) Source #
Lifts a given monad into the transformer
param | monad | Monad to lift |
returns |
|
method WriterT<W, M, A> Lift (K<M, A> monad) Source #
Lifts a given monad into the transformer
param | monad | Monad to lift |
returns |
|
method WriterT<W, M, A> Lift (Func<A> f) Source #
Lifts a function into the transformer
param | f | Function to lift |
returns |
|
method WriterT<W, M, A> LiftIO (IO<A> ma) Source #
Lifts a an IO monad into the monad
NOTE: If the IO monad isn't the innermost monad of the transformer stack then this will throw an exception.
param | ma | IO monad to lift |
returns |
|
method WriterT<W, M1, B> MapT <M1, B> (Func<K<M, (A Value, W Output)>, K<M1, (B Value, W Output)>> f) Source #
Maps the given monad
type | M1 | Trait of the monad to map to |
param | f | Mapping function |
returns |
|
method WriterT<W, M, B> MapM <B> (Func<K<M, A>, K<M, B>> f) Source #
Maps the given monad
param | f | Mapping function |
returns |
|
method WriterT<W, M, B> Map <B> (Func<A, B> f) Source #
Maps the bound value
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method WriterT<W, M, B> Select <B> (Func<A, B> f) Source #
Maps the bound value
type | B | Target bound value type |
param | f | Mapping transducer |
returns |
|
method WriterT<W, M, B> Bind <B> (Func<A, K<WriterT<W, M>, B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method WriterT<W, M, B> Bind <B> (Func<A, WriterT<W, M, B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method WriterT<W, M, Unit> Bind <B> (Func<A, Tell<W>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method WriterT<W, M, B> Bind <B> (Func<A, IO<B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method WriterT<W, M, C> SelectMany <B, C> (Func<A, K<WriterT<W, M>, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method WriterT<W, M, C> SelectMany <B, C> (Func<A, WriterT<W, M, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method WriterT<W, M, C> SelectMany <B, C> (Func<A, K<M, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method WriterT<W, M, C> SelectMany <B, C> (Func<A, Pure<B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method WriterT<W, M, C> SelectMany <C> (Func<A, Tell<W>> bind, Func<A, Unit, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method WriterT<W, M, C> SelectMany <B, C> (Func<A, IO<B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
class WriterTExtensions Source #
method WriterT<W, M, A> As <W, M, A> (this K<WriterT<W, M>, A> ma) Source #
method WriterT<W, M, A> Flatten <W, M, A> (this WriterT<W, M, WriterT<W, M, A>> mma) Source #
Monadic join
method WriterT<W, M, C> SelectMany <W, M, A, B, C> ( this K<M, A> ma, Func<A, K<WriterT<W, M>, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method WriterT<W, M, C> SelectMany <W, M, A, B, C> ( this K<M, A> ma, Func<A, WriterT<W, M, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
MonadWriterT
trait implementation for WriterT
type | S | State environment type |
type | M | Given monad trait |
MonadWriterT
trait implementation for WriterT
type | S | State environment type |
type | M | Given monad trait |
MonadWriterT
trait implementation for WriterT
type | S | State environment type |
type | M | Given monad trait |
method WriterT<W, M, B> bind <W, M, A, B> (WriterT<W, M, A> ma, Func<A, WriterT<W, M, B>> f) Source #
method WriterT<W, M, B> map <W, M, A, B> (Func<A, B> f, WriterT<W, M, A> ma) Source #
method WriterT<W, M, A> Pure <W, M, A> (A value) Source #
method WriterT<W, M, B> apply <W, M, A, B> (WriterT<W, M, Func<A, B>> mf, WriterT<W, M, A> ma) Source #
method WriterT<W, M, B> action <W, M, A, B> (WriterT<W, M, A> ma, WriterT<W, M, B> mb) Source #
method WriterT<W, M, A> lift <W, M, A> (K<M, A> ma) Source #
method WriterT<W, M, A> liftIO <W, M, A> (IO<A> effect) Source #
Lifts a given monad into the transformer
param | effect | Monad to lift |
returns |
|
method WriterT<W, M, Unit> tell <M, W> (W item) Source #
Tell is an action that produces the writer output
type | W | Writer type |
param | item | Item to tell |
returns | Structure with the told item |
method WriterT<W, M, A> write <M, W, A> ((A, W) item) Source #
Writes an item and returns a value at the same time
method WriterT<W, M, A> write <M, W, A> (A value, W item) Source #
Writes an item and returns a value at the same time
method WriterT<W, M, A> pass <M, W, A> (WriterT<W, M, (A Value, Func<W, W> Function)> action) Source #
pass
is an action that executes the action
, which returns a value and a
function; it then returns a the value with the output having been applied to
the function.
method WriterT<W, M, (A Value, W Output)> listen <M, W, A> (WriterT<W, M, A> ma) Source #
listen
is executes the action ma
and adds the result of applying f
to the
output to the value of the computation.